package controller;

import entity.db.CitationTextDB;
import entity.db.ReferencestableDB;
import entity.text.PaperEntity;
import service.CitationService;
import service.impl.CitationServiceImpl;

import java.io.File;
import java.util.List;
import java.util.Map;

/**
 * @author ：hzs
 * @date ：Created in 2020/12/4 16:22
 * @description：
 * @modified By：
 * @version: $
 */
public class CitationController {

    private CitationService citationService = new CitationServiceImpl();

    public List<List<Object>> getArgumentChainCitationAdjacency() {
        return citationService.getArgumentChainCitationAdjacency();
    }

    public List<ReferencestableDB> getCitationAdjacencyBycommunityid(int communityid) {
        return citationService.getCitationAdjacencyBycommunityid(communityid);
    }

    public Map<String, String> getFileNameByIDs(List<String> ids) {
        return citationService.getFileNameByIDs(ids);
    }

    public PaperEntity readPaperFromFile(File file) {
        return citationService.readPaperFromFile(file);
    }

    public List<String> extractorCitation(PaperEntity paperEntity, String citationIndex) {
        return citationService.extractorCitation(paperEntity, citationIndex);
    }

    public Map<String, List<String>> getCitationText() {
        return citationService.getCitationText();
    }

    public boolean insertCitationText(List<CitationTextDB> citationTextList) {
        return citationService.insertCitationText(citationTextList);
    }

}
